<?php

namespace App\Func\Goods;

use App\Facade\UserFuncFacade;
use App\Models\Goods\GoodsConfigModel;

class GoodsConfigFunc
{
    public function getConfig($key,$comId = 0){
        if(!$comId){
            $comId = UserFuncFacade::getCurrentComId();
        }
        $goodsConfigModel = new GoodsConfigModel();
        $info = $goodsConfigModel->select([$key])->where('com_id',$comId)->first();
        return $info->$key;
    }
}
